package org.seiya;

import org.seiya.spring.SpringUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.HashSet;
import java.util.Set;

@ServletComponentScan
@SpringBootApplication
public class Application {

    public static void main(String[] args) {
//		SpringApplication.run(Application.class, args);
        SpringApplication app = new SpringApplication(Application.class);
        app.setWebEnvironment(true);
        Set<Object> set = new HashSet<Object>();
        set.add("classpath:spring.xml");
        app.setSources(set);
        ConfigurableApplicationContext context = app.run(args);
        SpringUtil.setContext(context);
        System.out.println(System.getProperty("file.encoding"));
    }
}
